package top.lidee.common.service.twice.management.impl;

import cn.hutool.core.lang.Opt;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import top.lidee.common.service.twice.management.TFullNameOfBankService;
import top.lidee.framework.result.PageUtils;
import top.lidee.module.backendApi.twice.page.Query;
import top.lidee.repository.mapper.twice.management.TFullNameOfBankDao;
import top.lidee.repository.model.twice.pojo.management.TFullNameOfBankEntity;


@Service("tFullNameOfBankService")
public class TFullNameOfBankServiceImpl extends ServiceImpl<TFullNameOfBankDao, TFullNameOfBankEntity> implements TFullNameOfBankService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TFullNameOfBankEntity> page = this.page(
                new Query<TFullNameOfBankEntity>().getPage(params),
                new QueryWrapper<TFullNameOfBankEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<TFullNameOfBankEntity> listByName(String fullName) {

        List<TFullNameOfBankEntity> list = this.list(Wrappers.<TFullNameOfBankEntity>lambdaQuery()
                .like(TFullNameOfBankEntity::getFullName, fullName));

        return list;
    }

}